package com.example.demo.dao;

import com.example.demo.entity.TbBlogEntity;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.query.QueryByExampleExecutor;

import java.util.List;

public interface TbBlogDao extends JpaRepository<TbBlogEntity,Integer>, QueryByExampleExecutor<TbBlogEntity> {
    Page<TbBlogEntity> findByTagNameLike(String tagName, Pageable pageable);
    Page<TbBlogEntity> findByBlogTitleContainingOrBlogContentContaining(String blogTitle, String blogContent, Pageable pageable);
    List<TbBlogEntity> findByBlogIdContaining(String blogId);
}
